package com.wejoy.video.middle.station.data.exception;

/**
 * 自定义异常，service中业务异常使用这个
 */
public class BusinessException extends RuntimeException {


    private static final long serialVersionUID = -6053475656376646723L;

    Integer errorCode;

    String message;

    public BusinessException(String message) {
        this.message = message;
    }

    public BusinessException(Integer errorCode, String message) {
        this.errorCode = errorCode;
        this.message = message;
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public Integer getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
